//
//  LoginViewModel.h
//  myfamily
//
//  Created by xiayiyong on 15/7/2.
//  Copyright © 2015年 我爱我家. All rights reserved.
//

#import "BaseViewModel.h"
#import "LoginModel.h"

#import "Masonry.h"
#import <ReactiveCocoa/ReactiveCocoa.h>
#import <ReactiveCocoa/RACEXTScope.h>

@interface LoginViewModel : BaseViewModel

@property (nonatomic,strong) NSString *username;
@property (nonatomic,strong) NSString *password;
@property (nonatomic,strong) LoginRspModel *data;

@property (nonatomic,strong)RACCommand *loginCommand;
@property (nonatomic,strong)RACCommand *loginButtonCommand;

- (RACSignal *)signInSignal;

- (RACSignal *)checkPhonePasswordSignal;
- (RACSignal *)checkInputSignal;

-(void)loginWithUserName:(NSString*)username
             password:(NSString*)password
                 success:(void (^)(void))success
                 failure:(void (^)( NSString *error))failure;

@end
